export default 
    [
        {
            "title": "用户管理",
            "showLogic": "obj?.status == '2'",
            "fields": [
                { "label": "用户名称", "prop": "name.a", "showIn":["table", "query"], "tag": "input", "config":
                    {
                        "clearable": true, "placeholder": "请输入用户名称"
                    }
                },
                { "label": "手机号码", "prop": "phone", "showIn":["table", "query"], 'config': {
                    "tableLogic": "obj?.phone == '3' # rowClass('p-1')",
                }},
                { "label": "状态", "prop": "status", "showIn":["table", "query"], "tag": "select",
                    "config": {
                        "reqField": "status",
                        "enums": {
                            "active": '激活',
                            "inactive": '禁用',
                            "blocked": '锁定'
                        }
                    }
                },
                { "label": "邮箱", "prop": "email"},
                { "label": "地址", "prop": "address"},
                { "label": "创建时间", "prop": "createdAt | dateFormatter2YMDHMS", "showIn":["table", "query"], "tag": "datetimerange"},
                { "label": "修改时间", "prop": "updatedAt | dateFormatter2YMDHMS"}
            ],
            "operations": {
                "default": [
                    {
                        "title": "新增用户", "label": "新增", "actOn": "dialog", "rangeFn": "open", "btnClass": "add",
                        "fields": [
                            {"label": "用户名称", "prop": "name", "config": {
                                "rules": [{ "required": true, "message": '请输入用户名称', "trigger": 'blur' }]
                            }},
                            {"label": "昵称", "prop": "nickName"},
                            {"label": "密码", "prop": "password"},
                            {"label": "手机号码", "prop": "phone"},
                            {"label": "邮箱", "prop": "email"},
                            {"label": "地址", "prop": "address"},
                            {"label": "状态", "prop": "status", "tag": "select",
                                "config": {
                                    "reqField": "status",
                                    "enums": {
                                        "active": '激活',
                                        "inactive": '禁用',
                                        "blocked": '锁定'
                                    }
                                }
                            }
                        ],
                        "operations": [{
                            "label": "确认", "actOn": "dialog", "rangeFn": "commit", "operationLogic": "obj?.name == 2",
                            "request": { "url": "/api/user/create", "method": "post", "successMsg": "创建成功！", "successCb":
                                { "actOn": "table", "rangeFn": "update", "request": {"url": "/api/user/query", "method": "post" }, "params": {}},
                            }
                        }, {
                            "label": "取消", "rangeFn": "close", "actOn": "dialog"
                        }]
                    }, {
                        "label": "table处理", "actOn": "table", "rangeFn": "getSelection", "operationLogic": "obj?.name == 2",
                        "request": { "url": "/api/user/query", "method": "post", "fields": ["id", "name", "phone", "groupId"] }
                    }, {
                        "label": "按钮下拉", "actOn": "table", "rangeFn": "getSelection",
                        "list": [
                            {
                                "label": "新增", "actOn": "dialog", "rangeFn": "open", 
                                "fields": [{"label": "姓名", "prop": "name", "tag": "input"}, {"label": "年龄", "prop": "age", "tag": "input"}],
                                "operations": [{
                                    "label": "确认", "actOn": "dialog", "rangeFn": "commit", "operationLogic": "obj?.name == 2",
                                    "request": { "url": "/api/user/query", "method": "post" }
                                    }, {
                                    "label": "取消", "actOn": "dialog", "rangeFn": "close"
                                    }
                                ]
                            }
                        ]
                    }, {
                        "label": "query处理", "actOn": "query", "rangeFn": "getQueryData", "request": { "url": "/api/user/query", "method": "post" }
                    }, {
                        "label": "table + dialog处理", "actOn": "table", "rangeFn": "getSelection", 
                        "next": {
                            "label": "table + dialog处理", "actOn": "dialog", "rangeFn": "open", "headTip": "处理${selectedSize}",
                            "fields": [{"label": "姓名", "prop": "name", "tag": "input"}, {"label": "年龄", "prop": "age", "tag": "input"}, {"label": "性别", "prop": "sex", "tag": "input"}],
                            "operations": [{
                                    "label": "确认", "actOn": "dialog", "rangeFn": "commit",
                                    "request": { "url": "/api/user/query", "method": "post" }
                                }, {
                                    "label": "取消", "actOn": "dialog", "rangeFn": "close"
                                }
                            ]
                        }
                    }, {
                        "label": "query + dialog处理", "actOn": "query", "rangeFn": "getQueryData",
                        "next": {
                            "label": "query + dialog处理", "actOn": "dialog", "rangeFn": "open",
                            "fields": [{"label": "手机号", "prop": "phone", "tag": "input"}, {"label": "邮箱", "prop": "email", "tag": "input"}, {"label": "地址", "prop": "address", "tag": "input"}],
                            "operations": [{
                                    "label": "确认", "actOn": "dialog", "rangeFn": "commit",
                                    "request": { "url": "/api/user/query", "method": "post" }
                                }, {
                                    "label": "取消", "actOn": "dialog", "rangeFn": "close"
                                }
                            ]
                        }
                    }, {
                        "label": "query + table + dialog处理", "actOn": "query", "rangeFn": "getQueryData",
                        "next": {
                            "actOn": "table", "rangeFn": "getSelection", 
                            "next": {
                                "actOn": "dialog", "rangeFn": "open", "label": "query + table + dialog处理",
                                "fields": [
                                    {"label": "姓名", "prop": "name", "tag": "input"},
                                    {"label": "年龄", "prop": "age", "tag": "input"},
                                    {"label": "电话", "prop": "phone", "tag": "input"},
                                    {"label": "性别", "prop": "sex", "tag": "input"}
                                ],
                                "operations": [{
                                    "label": "确认", "actOn": "dialog", "rangeFn": "commit",
                                    "request": { "url": "/api/user/query", "method": "post" }
                                    }, {
                                    "label": "取消", "actOn": "dialog", "rangeFn": "close"
                                    }, {
                                        "label": "下一步", "actOn": "dialog", "rangeFn": "getData", "showLogic": "obj?.aaa == 22 && obj?.bbb == 111",
                                        "next": {
                                            "actOn": "dialog", "rangeFn": "open",
                                            "fields": [
                                                {"label": "姓名1", "prop": "name1", "tag": "input"},
                                                {"label": "年龄2", "prop": "age1", "tag": "input"},
                                                {"label": "电话3", "prop": "phone1", "tag": "input"},
                                                {"label": "性别4", "prop": "sex1", "tag": "input"}
                                            ],
                                            "operations": [{
                                                "label": "确认", "actOn": "dialog", "rangeFn": "commit",
                                                "request": { "url": "/api/user/query", "method": "post" }
                                                }, {
                                                "label": "取消", "actOn": "dialog", "rangeFn": "close"
                                                },{
                                                    "label": "下一步", "actOn": "dialog", "rangeFn": "getData",
                                                    "next": {
                                                        "actOn": "dialog", "rangeFn": "open",
                                                        "fields": [
                                                            {"label": "姓名11", "prop": "name2", "tag": "input"},
                                                            {"label": "年龄22", "prop": "age2", "tag": "input"},
                                                            {"label": "电话33", "prop": "phone2", "tag": "input"},
                                                            {"label": "性别44", "prop": "sex2", "tag": "input"}
                                                        ],
                                                        "operations": [{
                                                            "label": "确认", "actOn": "dialog", "rangeFn": "commit",
                                                            "request": { "url": "/api/user/query", "method": "post" }
                                                            }, {
                                                            "label": "取消", "actOn": "dialog", "rangeFn": "close"
                                                        }]
                                                    }
                                                }]
                                        }
                                    }
                                ],
                            }
                        }
                    },
                    {
                        "label": "自定义处理", "actOn": "query", "rangeFn": "getQueryData", "next": {
                            "actOn": "table", "rangeFn": "getSelection", "rangeFnExcuteJs": "function(obj) {console.log(obj);return obj}(obj)", "next": {
                                "isCustom": true, "request": { "url": "/api/user/query", "method": "post" }
                            }
                        }
                    },
                ],
                "table": [
                    { "label": "编辑", "actOn": "dialog", "rangeFn": "open", "showLogic": "obj.permissions.includes(1)", "btnClass": "edit",
                        "fields": [
                            {"label": "用户ID", "prop": "id", "config": {
                                "disabled": true
                            }},
                            {"label": "用户名称", "prop": "name.a"},
                            {"label": "手机号码", "prop": "phone"},
                            {"label": "角色", "prop": "roleName", "tag": "select", "config": 
                                {
                                    "reqField": "roleId",
                                    "enum": {
                                        "b578e8c0e8295ec295e7cc89447271ab": '管理员',
                                        "9886d03139161f1329dfb6049e3a1910": '普通用户',
                                        "70545e008dd490edea15bdd228e566fc": '超级管理员'
                                    }
                                }
                            },
                            { "label": "所属部门", "prop": "zoneId", "tag": "asyncSelect", "config":
                                {
                                    "url": "/api/zone/select", "method": "post", "fieldKey": "name", "fieldValue": "id",
                                }
                            },
                            { "label": "所属组", "prop": "groupId", "tag": "asyncSelect", "config":
                                {
                                    "url": "/api/group/select", "method": "post", "fieldKey": "name", "fieldValue": "id",
                                }
                            },
                            { "label": "所属岗位", "prop": "postId", "tag": "asyncSelect", "config":
                                {
                                    "url": "/api/post/select", "method": "post", "fieldKey": "name", "fieldValue": "id",
                                }
                            },
                            { "label": "备注", "prop": "description", "config":
                                {
                                    "type": "textarea",
                                }
                            }
                        ],
                        "operations": [{
                            "label": "确认", "rangeFn": "commit", "actOn": "dialog", "isCloseDialog": true,
                            "request": { "url": "/user/update", "method": "post", "fetchMsg": "创建成功！", "successCb": { "actOn": "table", "rangeFn": "update", "request": {"url": "/user/query", "method": "post" }, "params": {}}}
                        }, {
                            "label": "取消", "actOn": "dialog", "rangeFn": "close"
                        }]
                    },
                    { "label": "删除", "actOn": "table", "rangeFn": "delete", "request": { "url": "/api/user/del/${id}", "method": "post", "successCb": { "rangeFn": "update", "request": {"url": "/user/query", "method": "post" }, "params": {}}}}
                ],
                "query": [
                    { "label": "重置", "actOn": "query", "rangeFn": "reset", "btnClass": "reset" },
                    { "label": "查询", "actOn": "table", "rangeFn": "update", "btnLoading": true, "request": {
                        "url": "/api/user/query",
                        "method": "post",
                        "params": {"pageNum": 1},
                        "beforeExcuteJsStr": "function(obj){return obj;}(obj)",
                        "afterExcuteJsStr": "function(obj){obj.body.forEach((el,idx) => {el.name = {'a': idx}});console.log(obj);return obj;}(obj)"
                    }
                }]
            }
        },
        {
            "title": "用户管理",
            "showLogic": "",
            "fields": [
                { "label": "用户名称", "prop": "name.a", "showIn":["table", "query"], "tag": "input", "config":
                    {
                        "clearable": true, "placeholder": "请输入用户名称"
                    }
                },
                { "label": "手机号码", "prop": "phone", "showIn":["table", "query"], 'config': {
                    "tableLogic": "obj?.phone == '3' # rowClass('p-1')",
                }},
                { "label": "状态", "prop": "status", "showIn":["table", "query"], "tag": "select",
                    "config": {
                        "reqField": "status",
                        "enums": {
                            "active": '激活',
                            "inactive": '禁用',
                            "blocked": '锁定'
                        }
                    }
                },
                { "label": "邮箱", "prop": "email"},
                { "label": "地址", "prop": "address"},
                { "label": "创建时间", "prop": "createdAt | dateFormatter2YMDHMS", "showIn":["table", "query"], "tag": "datetimerange"},
                { "label": "修改时间", "prop": "updatedAt | dateFormatter2YMDHMS"}
            ],
            "operations": {
                "default": [
                    {
                        "title": "新增用户", "label": "新增", "actOn": "dialog", "rangeFn": "open", "btnClass": "add",
                        "fields": [
                            {"label": "用户名称", "prop": "name", "config": {
                                "rules": [{ "required": true, "message": '请输入用户名称', "trigger": 'blur' }]
                            }},
                            {"label": "昵称", "prop": "nickName"},
                            {"label": "密码", "prop": "password"},
                            {"label": "手机号码", "prop": "phone"},
                            {"label": "邮箱", "prop": "email"},
                            {"label": "地址", "prop": "address"},
                            {"label": "状态", "prop": "status", "tag": "select",
                                "config": {
                                    "reqField": "status",
                                    "enums": {
                                        "active": '激活',
                                        "inactive": '禁用',
                                        "blocked": '锁定'
                                    }
                                }
                            }
                        ],
                        "operations": [{
                            "label": "确认", "actOn": "dialog", "rangeFn": "commit", "operationLogic": "obj?.name == 2",
                            "request": { "url": "/api/user/create", "method": "post", "successMsg": "创建成功！", "successCb":
                                { "actOn": "table", "rangeFn": "update", "request": {"url": "/api/user/query", "method": "post" }, "params": {}},
                            }
                        }, {
                            "label": "取消", "rangeFn": "close", "actOn": "dialog"
                        }]
                    }, {
                        "label": "table处理", "actOn": "table", "rangeFn": "getSelection", "operationLogic": "obj?.name == 2",
                        "request": { "url": "/api/user/query", "method": "post", "fields": ["id", "name", "phone", "groupId"] }
                    }, {
                        "label": "按钮下拉", "actOn": "table", "rangeFn": "getSelection",
                        "list": [
                            {
                                "label": "新增", "actOn": "dialog", "rangeFn": "open", 
                                "fields": [{"label": "姓名", "prop": "name", "tag": "input"}, {"label": "年龄", "prop": "age", "tag": "input"}],
                                "operations": [{
                                    "label": "确认", "actOn": "dialog", "rangeFn": "commit", "operationLogic": "obj?.name == 2",
                                    "request": { "url": "/api/user/query", "method": "post" }
                                    }, {
                                    "label": "取消", "actOn": "dialog", "rangeFn": "close"
                                    }
                                ]
                            }
                        ]
                    }, {
                        "label": "query处理", "actOn": "query", "rangeFn": "getQueryData", "request": { "url": "/api/user/query", "method": "post" }
                    }, {
                        "label": "table + dialog处理", "actOn": "table", "rangeFn": "getSelection", 
                        "next": {
                            "label": "table + dialog处理", "actOn": "dialog", "rangeFn": "open", "headTip": "处理${selectedSize}",
                            "fields": [{"label": "姓名", "prop": "name", "tag": "input"}, {"label": "年龄", "prop": "age", "tag": "input"}, {"label": "性别", "prop": "sex", "tag": "input"}],
                            "operations": [{
                                    "label": "确认", "actOn": "dialog", "rangeFn": "commit",
                                    "request": { "url": "/api/user/query", "method": "post" }
                                }, {
                                    "label": "取消", "actOn": "dialog", "rangeFn": "close"
                                }
                            ]
                        }
                    }, {
                        "label": "query + dialog处理", "actOn": "query", "rangeFn": "getQueryData",
                        "next": {
                            "label": "query + dialog处理", "actOn": "dialog", "rangeFn": "open",
                            "fields": [{"label": "手机号", "prop": "phone", "tag": "input"}, {"label": "邮箱", "prop": "email", "tag": "input"}, {"label": "地址", "prop": "address", "tag": "input"}],
                            "operations": [{
                                    "label": "确认", "actOn": "dialog", "rangeFn": "commit",
                                    "request": { "url": "/api/user/query", "method": "post" }
                                }, {
                                    "label": "取消", "actOn": "dialog", "rangeFn": "close"
                                }
                            ]
                        }
                    }, {
                        "label": "query + table + dialog处理", "actOn": "query", "rangeFn": "getQueryData",
                        "next": {
                            "actOn": "table", "rangeFn": "getSelection", 
                            "next": {
                                "actOn": "dialog", "rangeFn": "open", "label": "query + table + dialog处理",
                                "fields": [
                                    {"label": "姓名", "prop": "name", "tag": "input"},
                                    {"label": "年龄", "prop": "age", "tag": "input"},
                                    {"label": "电话", "prop": "phone", "tag": "input"},
                                    {"label": "性别", "prop": "sex", "tag": "input"}
                                ],
                                "operations": [{
                                    "label": "确认", "actOn": "dialog", "rangeFn": "commit",
                                    "request": { "url": "/api/user/query", "method": "post" }
                                    }, {
                                    "label": "取消", "actOn": "dialog", "rangeFn": "close"
                                    }, {
                                        "label": "下一步", "actOn": "dialog", "rangeFn": "getData", "showLogic": "obj?.aaa == 22 && obj?.bbb == 111",
                                        "next": {
                                            "actOn": "dialog", "rangeFn": "open",
                                            "fields": [
                                                {"label": "姓名1", "prop": "name1", "tag": "input"},
                                                {"label": "年龄2", "prop": "age1", "tag": "input"},
                                                {"label": "电话3", "prop": "phone1", "tag": "input"},
                                                {"label": "性别4", "prop": "sex1", "tag": "input"}
                                            ],
                                            "operations": [{
                                                "label": "确认", "actOn": "dialog", "rangeFn": "commit",
                                                "request": { "url": "/api/user/query", "method": "post" }
                                                }, {
                                                "label": "取消", "actOn": "dialog", "rangeFn": "close"
                                                },{
                                                    "label": "下一步", "actOn": "dialog", "rangeFn": "getData",
                                                    "next": {
                                                        "actOn": "dialog", "rangeFn": "open",
                                                        "fields": [
                                                            {"label": "姓名11", "prop": "name2", "tag": "input"},
                                                            {"label": "年龄22", "prop": "age2", "tag": "input"},
                                                            {"label": "电话33", "prop": "phone2", "tag": "input"},
                                                            {"label": "性别44", "prop": "sex2", "tag": "input"}
                                                        ],
                                                        "operations": [{
                                                            "label": "确认", "actOn": "dialog", "rangeFn": "commit",
                                                            "request": { "url": "/api/user/query", "method": "post" }
                                                            }, {
                                                            "label": "取消", "actOn": "dialog", "rangeFn": "close"
                                                        }]
                                                    }
                                                }]
                                        }
                                    }
                                ],
                            }
                        }
                    },
                    {
                        "label": "自定义处理", "actOn": "query", "rangeFn": "getQueryData", "next": {
                            "actOn": "table", "rangeFn": "getSelection", "rangeFnExcuteJs": "function(obj) {console.log(obj);return obj}(obj)", "next": {
                                "isCustom": true, "request": { "url": "/api/user/query", "method": "post" }
                            }
                        }
                    },
                ],
                "table": [
                    { "label": "编辑", "actOn": "dialog", "rangeFn": "open", "showLogic": "obj.permissions.includes(1)", "btnClass": "edit",
                        "fields": [
                            {"label": "用户ID", "prop": "id", "config": {
                                "disabled": true
                            }},
                            {"label": "用户名称", "prop": "name.a"},
                            {"label": "手机号码", "prop": "phone"},
                            {"label": "角色", "prop": "roleName", "tag": "select", "config": 
                                {
                                    "reqField": "roleId",
                                    "enum": {
                                        "b578e8c0e8295ec295e7cc89447271ab": '管理员',
                                        "9886d03139161f1329dfb6049e3a1910": '普通用户',
                                        "70545e008dd490edea15bdd228e566fc": '超级管理员'
                                    }
                                }
                            },
                            { "label": "所属部门", "prop": "zoneId", "tag": "asyncSelect", "config":
                                {
                                    "url": "/api/zone/select", "method": "post", "fieldKey": "name", "fieldValue": "id",
                                }
                            },
                            { "label": "所属组", "prop": "groupId", "tag": "asyncSelect", "config":
                                {
                                    "url": "/api/group/select", "method": "post", "fieldKey": "name", "fieldValue": "id",
                                }
                            },
                            { "label": "所属岗位", "prop": "postId", "tag": "asyncSelect", "config":
                                {
                                    "url": "/api/post/select", "method": "post", "fieldKey": "name", "fieldValue": "id",
                                }
                            },
                            { "label": "备注", "prop": "description", "config":
                                {
                                    "type": "textarea",
                                }
                            }
                        ],
                        "operations": [{
                            "label": "确认", "rangeFn": "commit", "actOn": "dialog", "isCloseDialog": true,
                            "request": { "url": "/user/update", "method": "post", "fetchMsg": "创建成功！", "successCb": { "actOn": "table", "rangeFn": "update", "request": {"url": "/user/query", "method": "post" }, "params": {}}}
                        }, {
                            "label": "取消", "actOn": "dialog", "rangeFn": "close"
                        }]
                    },
                    { "label": "删除", "actOn": "table", "rangeFn": "delete", "request": { "url": "/api/user/del/${id}", "method": "post", "successCb": { "rangeFn": "update", "request": {"url": "/user/query", "method": "post" }, "params": {}}}}
                ],
                "query": [
                    { "label": "重置", "actOn": "query", "rangeFn": "reset", "btnClass": "reset" },
                    { "label": "查询", "actOn": "table", "rangeFn": "update", "btnLoading": true, "request": {
                        "url": "/api/user/query",
                        "method": "post",
                        "params": {"pageNum": 1},
                        "beforeExcuteJsStr": "function(obj){return obj;}(obj)",
                        "afterExcuteJsStr": "function(obj){obj.body.forEach((el,idx) => {el.name = {'a': idx}});console.log(obj);return obj;}(obj)"
                    }
                }]
            }
        }
    ]
